#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	float pay, discount;
	while (cin >> pay)
	{
		if (pay >= 5000)discount = 0.8;
		else if (pay >= 3000)discount = 0.85;
		else if (pay >= 2000)discount = 0.9;
		else if (pay >= 1000)discount = 0.95;
		else discount = 1;
		cout << "discount=" << discount << ",pay=" << pay*discount << endl;
	}
	return 0;
}